"""
文件读写

"""
from pathlib import Path
# def write1():
#     with open("2.txt","w",encoding="utf-8") as file:
#         file.write("nihao\n")
#         file.write("wobuhao")
#         # file.write(18) write() argument must be str, not int
# write1()
from Student import Student
s1 = Student("宋江",32,"男","山东")
with open("stu.txt","w",encoding="UTF-8") as file:
    file.write(s1.__repr__())

with open("stu.txt","r",encoding="UTF-8") as file:
    s2=eval(file.read())
    print(type(s2))
    print(s2)